package com.shanpin.shebao.web.module.game.vo;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;

import com.shanpin.core.utils.DateUtil;
import com.shanpin.shebao.web.module.game.model.EStatisEvent;

public class GameStatisVO {

	private int statisId;
	private int event;
	private String eventName;
	private String eventExt;
	private int c;
	private String data;
	private String updateTime;
	
	public static RowMapper<GameStatisVO> MAPPER = new RowMapper<GameStatisVO>() {
		@Override
		public GameStatisVO mapRow(ResultSet rs, int rowNum) throws SQLException {
			GameStatisVO s = new GameStatisVO();
			s.setStatisId(rs.getInt("statis_id"));
			s.setEvent(EStatisEvent.of(rs.getInt("event")).getCode());
			s.setEventName(EStatisEvent.of(rs.getInt("event")).getName());
			s.setEventExt(rs.getString("event_ext"));
			s.setC(rs.getInt("c"));
			s.setData(rs.getString("data"));
			s.setUpdateTime(DateUtil.dateStr(rs.getTimestamp("update_time")));
			return s;
		}
	};
	public int getStatisId() {
		return statisId;
	}
	public void setStatisId(int statisId) {
		this.statisId = statisId;
	}
	public int getEvent() {
		return event;
	}
	public void setEvent(int event) {
		this.event = event;
	}
	public String getEventName() {
		return eventName;
	}
	public void setEventName(String eventName) {
		this.eventName = eventName;
	}
	public String getEventExt() {
		return eventExt;
	}
	public void setEventExt(String eventExt) {
		this.eventExt = eventExt;
	}
	public int getC() {
		return c;
	}
	public void setC(int c) {
		this.c = c;
	}
	public String getData() {
		return data;
	}
	public void setData(String data) {
		this.data = data;
	}
	public String getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(String updateTime) {
		this.updateTime = updateTime;
	}
}
